  <%- include header%>
    <% if(user && (user.name == post.name)) { %>
    <p>
      <span><a href="/edit/<%= post.name %>/<%= post.time.day %>/<%= post.title%>" class="edit">编辑</a></span>
      <span><a href="/remove/<%= post.name %>/<%= post.time.day %>/<%= post.title%>" class="edit">删除</a></span>
    </p>
    <% } %>

    <% var flag = 1 %>
    <% if (user && (user.name != post.name)) {%>
      <% if ((post.reprint_info.reprint_from != undefined) && (user.name == post.reprint_info.reprint_from.name)){%>
        <% flag =0 %>
      <% } %>
      <% if ((post.reprint_info.reprint_to !=undefined)){%>
        <% post.reprint_info.reprint_to.forEach(function(reprint_to,index){%>
          <% if(user.name == reprint_to.name){%>
            <% flag = 0%>
          <%}%>
        <%})%>
      <% } %>
    <% } else{%>
      <% flag = 0 %>
    <%}%>
    <% if(flag){%>
      <span><a href="/reprint/<%= post.name%>/<%= post.time.day%>/<%= post.title%>" class="edit">转载</a></span>
    <% } %>

      <p class="info">
        作者:<a href="/u/<%= post.name%>"><%= post.name%></a>|
        日期:<%= post.time.minute%>
        标签:
        <% post.tags.forEach(function(tag,index){ %>
          <% if (tag) {%>
            <a href="/tags/<%= tag%>" class="tag"><%= tag%></a>
          <% } %>
        <% }) %>
        <% if(post.reprint_info.reprint_from){%>
          <br>
          <a href="/u/<%= post.reprint_info.reprint_from.name%>/<%= post.reprint_info.reprint_from.day%>/<%= post.reprint_info.reprint_from.title%>">原文链接</a>
        <%}%>
      </p>
      <p>
        <%- post.post%>
        <p class="info">
          阅读：<%= post.pv %> |
          评论：<%= post.comments.length %> |
          转载：
          <% if (post.reprint_info.reprint_to) { %>
            <%= post.reprint_info.reprint_to.length %>
          <% } else { %>
            <%= 0 %>
          <% } %>
        </p>
      </p>
  <%- include comment%>
  <%- include footer%>
